﻿using System;
using System.Collections.Generic;
using Newtonsoft.Json;
using FreeSql.DataAnnotations;
using Frame.Core.Models.Dto;

namespace Frame.Core.Models
{
    [JsonObject(MemberSerialization.OptIn), Table(DisableSyncStructure = true)]
    public partial class TaskScheduling
    {
        [JsonProperty, Column(IsPrimary = true, IsIdentity = true)]
        public int Id { get; set; }

        /// <summary>
        /// 客户
        /// </summary>
        [JsonProperty, Column(StringLength = 50)]
        public string Customer { get; set; }

        /// <summary>
        /// 发起金额
        /// </summary>
        [JsonProperty]
        public decimal LaunchAmount { get; set; }

        /// <summary>
        /// 发起图片
        /// </summary>
        [JsonProperty, Column(StringLength = 200)]
        public string LaunchPicUrl { get; set; }


        /// <summary>
        /// 发起备注
        /// </summary>
        [JsonProperty, Column(StringLength = 500)]
        public string LaunchRemark { get; set; }

        /// <summary>
        /// 回复图片
        /// </summary>
        [JsonProperty, Column(StringLength = 200)]
        public string ReceivePicUrl { get; set; }

        /// <summary>
        /// 回复金额
        /// </summary>
        [JsonProperty]
        public decimal ReceiveAmount { get; set; }


        /// <summary>
        /// 回复备注
        /// </summary>
        [JsonProperty, Column(StringLength = 500)]
        public string ReceiveRemark { get; set; }


        /// <summary>
        /// 状态
        /// </summary>
        [JsonProperty]
        public bool Status { get; set; }

        /// <summary>
        /// 回复读取状态
        /// </summary>
        [JsonProperty]
        public bool ReadStatus { get; set; }


        /// <summary>
        /// 回复状态
        /// </summary>
        [JsonProperty]
        public int ResultStatus { get; set; }


        /// <summary>
        /// 发起人
        /// </summary>
        [JsonProperty]
        public int LaunchId { get; set; }


        /// <summary>
        /// 发起时间
        /// </summary>
        [JsonProperty]
        public DateTime LaunchTime { get; set; }


        /// <summary>
        /// 接收人
        /// </summary>
        [JsonProperty]
        public int ReceiveId { get; set; }



        /// <summary>
        /// 回复时间
        /// </summary>
        [JsonProperty, Column(StringLength = 20)]
        public string ResultTime { get; set; }

        /// <summary>
        /// 回复读取时间
        /// </summary>
        [JsonProperty, Column(StringLength = 20)]
        public string ResultReadTime { get; set; }

        #region 外键 => 导航属性，ManyToOne/OneToOne

        [Navigate("ResultStatus"), JsonProperty]
        public virtual TypeEnum Navigate_ResultStatus { get; set; }

        [Navigate("LaunchId"), JsonProperty]
        public virtual UsersDto Users_Launch { get; set; }

        [Navigate("ReceiveId"), JsonProperty]
        public virtual UsersDto Users_Receive { get; set; }

        #endregion

    }
}

